Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(UBNetworkAccessManager): Use atomic_int instead of volatile #1048

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Vekhir
Copy link
Contributor

@Vekhir Vekhir commented Aug 14, 2024

volatile is intended for hardware interaction, where changes might not be obvious from the given code, disabling certain compiler features.
The intended use is atomic operations, so use that instead.

There are other uses of volatile which probably mean to be atomic, but they are mostly in the recording section which I can't really test, don't want to test, and since they don't create warnings should probably be left alone.

Resolves warning 5 of #1046

volatile is intended for hardware interaction, where changes might
not be obvious from the given code, disabling certain compiler
features.
The intended use is atomic operations, so use that instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant